package com.qian.fmall.banner;

import com.qian.fmall.commons.ResultSet;
import com.qian.fmall.mapper.BannerMapper;
import com.qian.fmall.pojo.IndexImg;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;

@Service
@DubboService
public class BannerService implements BannerInterface{
    @Resource
    private BannerMapper bannerMapper;
    @Override
    public ResultSet getBanner() {
        List<IndexImg> imgByStatus = bannerMapper.getImgByStatus();
        if(imgByStatus==null)
        {
            return ResultSet.error("图片未找到");
        }
        return ResultSet.ok("ok",imgByStatus);
    }
}
